<?php

namespace MythTest\Data\Model\Mapper\Mocks;

use Myth\Data\Model\Mapper as MythMapper;

class UserMapper extends MythMapper\AMapper
{
    protected $_namespace = 'User';
    protected $_name = 'User';
    
    protected $_mappings = array(
        //map the User module's User model
        'User.User' => array(
            'Source' => 'User.User', //will map to User modules DbTable/User by default
            'PropertyMap' => array(
                'Id', //will map User::_id to the result row of userstable.id
                'Nickname' => 'username', //will map User::_nickname to userstable.username
                'Email'
            ),
            'Relations' => array(
                'User.Profile' => array(
                    'Property' => 'ProfileId',//which property to set the object to
                    'type' => 'owned' //lets us know profile is owned by user and thus has the fk 
                ),
                'List.Link' => array(
                    'Property' => 'Links',
                    'Type' => 'hasMany'
                )
            )
        )
    );
    
    public function test()
    {
        //self::
    }
}